<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="display" uri="http://displaytag.sf.net"%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="id" lang="id">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
	<script type="text/javascript">
	
		function next(elem) {
			do {
				elem = elem.nextSibling;
			} while (elem && elem.nodeType != 1);
			return elem;		
		}
		function addmore(ele) {
			var che = ele.parentNode.parentNode.childNodes[1].childNodes[0].innerHTML.substring(0,5);
			var nextElem_1 = next(ele.parentNode.parentNode); 
			var nextElem_2 = next(nextElem_1); 
			var nextElem_3 = next(nextElem_2); 
			if(che == 'Skill' || che == 'Licen') {
				if (nextElem_1) {
					nextElem_1.removeAttribute("style");
				}
			}
			else {
				if (nextElem_1 && nextElem_2 && nextElem_3) {
					nextElem_1.removeAttribute("style");
					nextElem_2.removeAttribute("style");
					nextElem_3.removeAttribute("style");
				}
			}
			ele.setAttribute("hidden", "");
		}
				
	</script>
</head>
<body>
	<html:form action="/vacancyUpdate.do" method="post" enctype="multipart/form-data">
	<html:hidden property="id" />
	<html:hidden property="description" />
	<div class="outerbox">
		<div class="mainHeading">
			<div class=""
				style="width: 330px; height: 32px; background: url(images/formTitleBackground.png) no-repeat top right; font-color: #CC0000;">
				<h2 class="formTitle">VACANCY UPDATE</h2>
			</div>
		</div>
		<div class="searchbox"> 
				<div id="formcontent">
					<br class="clear" />
					<table style="width: 100%; min-width: 980px; padding-bottom: 10px;">
			<tr>
				<td class="txtLabel"><label>Name: *</label></td>
				<td><html:text property="name" style="width:200px; margin-right: 0px;"></html:text></td>
				<td class="txtLabel"><label>Job Title: *</label></td>
				<td>
					<html:select name="vacancyUpdate" property="jobTitle" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allJobTitles" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Hiring Manager: *</label></td>
				<td>
					<html:text styleId="employeeTextBoxId" property="hiringManager" style="width:200px;" onkeyup="retrieveURL('employeeAjax', 'employeeTextBoxId');"></html:text>
				</td>
			</tr>
			<tr>
				<td class="txtLabel"><label>No. of Positions: *</label></td>
				<td><html:text property="noOfPositions" style="width:200px; margin-right: 0px;"></html:text></td>
				<td class="txtLabel"><label>Status: *</label></td>
				<td>
					<html:select name="vacancyUpdate" property="status" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allStatuses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Attachment</label></td>
				<td><html:file property="attachFile" style="width:200px;background-color:white; margin-right: 0px;"/></td>
			</tr>
			<tr>
				
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td colspan="7" style="color: blue; font-size: 16px; font-weight: bold; padding-left: 10px;">ADVANCED OPTIONS FOR RAPID CANDIDATE FILTER</td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td class="txtLabel"><label>Education Weight</label></td>
				<td><html:text property="eduWeight" style="width:200px; margin-right: 0px;"></html:text></td>
				<td class="txtLabel"><label>Language Weight</label></td>
				<td><html:text property="langWeight" style="width:200px; margin-right: 0px;"></html:text></td>
			</tr>
			<tr>
				<td class="txtLabel"><label>Skill Weight</label></td>
				<td><html:text property="skillWeight" style="width:200px; margin-right: 0px;"></html:text></td>
				<td class="txtLabel"><label>License Weight</label></td>
				<td><html:text property="licenseWeight" style="width:200px; margin-right: 0px;"></html:text></td>
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td class="txtLabel"><label>Education 1</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu1Level" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allEducation" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu1LevelImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr>
				<td class="txtLabel"><label>Major 1</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu1Major" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allMajors" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu1MajorImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			<tr style="display: none">
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Education 2</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu2Level" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allEducation" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu2LevelImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Major 2</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu2Major" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allMajors" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu2MajorImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			<tr style="display: none">
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Education 3</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu3Level" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allEducation" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu3LevelImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Major 3</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu3Major" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allMajors" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="edu3MajorImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
<!-- ---------------------------------------- LANGUAGE SECTION --------------------------------------------------------------- -->
			
			<tr>
				<td class="txtLabel"><label>Language 1</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLanguages" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Reading Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1ReadImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Speaking Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1SpeakImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Listening Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1ListenImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Writing Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang1WriteImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			<tr style="display: none">
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>Language 2</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLanguages" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Reading Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2ReadImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Speaking Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2SpeakImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Listening Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2ListenImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Writing Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang2WriteImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			<tr style="display: none">
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>Language 3</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLanguages" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Reading Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3ReadImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Speaking Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3SpeakImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr style="display: none">
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Listening Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3ListenImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Writing Skill</label></td>
				<td>
					<html:select name="vacancyUpdate" property="lang3WriteImp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
<!-- ------------------------------------------- SKILL SECTION -------------------------------------- -->

			<tr>
				<td class="txtLabel"><label>Skill 1</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill1" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allSkills" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill1Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			
			<tr>
				<td class="txtLabel"><label>Skill 2</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill2" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allSkills" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill2Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>Skill 3</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill3" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allSkills" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill3Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>Skill 4</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill4" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allSkills" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill4Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>Skill 5</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill5" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allSkills" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="skill5Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allAdvantageLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			
<!-- -------------------------------------------- LICENSE SECTION ------------------------------------- -->

			<tr>
				<td class="txtLabel"><label>License 1</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license1" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLicenses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license1Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			
			<tr>
				<td class="txtLabel"><label>License 2</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license2" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLicenses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license2Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>License 3</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license3" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLicenses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license3Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>License 4</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license4" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLicenses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license4Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
						
				</td>
				<td><a href="javascript:void(0)" onclick="addmore(this)" style="color: blue">More...</a></td>
			</tr>
			
			<tr style="display: none">
				<td class="txtLabel"><label>License 5</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license5" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allLicenses" label="label" value="value" />
					</html:select>
				</td>
				<td class="txtLabel"><label>Condition Option</label></td>
				<td>
					<html:select name="vacancyUpdate" property="license5Imp" style="width:200px; margin-right: 0px;">
						<html:optionsCollection property="allImportanceLevels" label="label" value="value" />
					</html:select>
				</td>
			</tr>
			
			<tr>
				<td colspan="7"><hr/></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
			<tr>
				<td class="txtLabel" style="width:120px;"></td>
				<td>
					<logic:equal name="vacancyUpdate" value="true" property="success">
						<a style="color: blue;"><bean:write name="vacancyUpdate" property="message"/></a>
					</logic:equal>
					<logic:equal name="vacancyUpdate" value="false" property="success">
						<a style="color: red;"><bean:write name="vacancyUpdate" property="message"/></a>
					</logic:equal>
				</td>
			</tr>
		</table> 
		</div>
		<div class="actionbar_form" style="border-top: 2px solid #191919;">
			<div class="actionbuttons">
				<html:submit styleClass="plainbtn" value="Edit" onclick="postParams('act=edit&btnEdit');">Edit</html:submit> 
				<html:reset styleClass="plainbtn">Reset</html:reset>
			</div>
		</div>
		<br class="clear" />
		</div>
	</div>

	</html:form>
</body>
</html>